package cn.edu.scau.cmi.zenghaonan.chapter06;

abstract class C{
	abstract int sum(int x,int y);
	int sub(int x,int y) {
		return x-y;
	}
}

class D extends C{
	int sum(int x,int y) {
		return x+y;
	}
}

public class Example6_9 {
	public static void main(String[] args) {
		D b=new D();
		System.out.printf("sum=%d\nsub=%d",b.sum(30, 20),b.sub(30, 20));
	}
}
